package com.xcity.game.activity.thirtyday;

import naga.x.game.template.Template;
import naga.x.game.template.TemplateException;
import naga.x.game.template.annotation.Binding;
import naga.x.game.template.annotation.Excel;

/**
 * 豪华签到商城
 * @author shipeng.zhu
 *
 */
@Excel(value = "activity.xlsx", sheetName = "豪华签到商城")
public class ThirtyDayShopTemplate extends Template {

	/** 类型 */
	protected int type;

	/** 消耗钻石 */
	protected int costStone;

	/** 消耗债券 */
	protected int costBond;

	/** 购买物品数量 */
	protected int count;

	/** 限购次数 */
	protected int limitCount;
	
	/** 显示折扣 */
	protected int showDiscount;

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getCostStone() {
		return costStone;
	}

	public void setCostStone(int costStone) {
		this.costStone = costStone;
	}

	public int getCostBond() {
		return costBond;
	}

	public void setCostBond(int costBond) {
		this.costBond = costBond;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public int getLimitCount() {
		return limitCount;
	}

	public void setLimitCount(int limitCount) {
		this.limitCount = limitCount;
	}
	
	public int getShowDiscount() {
		return showDiscount;
	}

	public void setShowDiscount(int showDiscount) {
		this.showDiscount = showDiscount;
	}

	@Override
	public void validate() throws TemplateException {
		if(limitCount < 1){
			throw new TemplateException("activity.xlsx 豪华签到商城配置有误! id=" + id);
		}
		if(costBond < 1 && costStone < 1){
			throw new TemplateException("activity.xlsx 豪华签到商城配置有误! id=" + id);
		}
	}
}
